home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_01_01
/
1n01050a
< prev
next >
Wrap
Text File
|
1990-05-16
|
804b
|
38 lines
*****Listing 3*****
#include <stdio.h>
extern int text_height;
/**************************************************
* lj_outtextxy() - output string to laser printer
*
* Parameters:
* x (in) - x position in dots.
* y (in) - y position in dots.
* string (in) - string to output
*
* Global:
* text_height - height of text characters.
*
* Notes:
* 1. Compiled with Turbo C version 2.0
* 2. x,y = 0,0 is upper left corner of page
*
* History:
* Original code by William H. Roetzheim, 1990
***************************************************/
void lj_outtextxy(int x, int y, char *string)
{
/* adjust y position */
y += text_height;
/* move cursor to new position */
fprintf(stdprn, "\033*p%dx%dY", x, y);
/* output string */
fprintf(stdprn, string);
}